<?php get_header(); ?>

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
	
	<ul id="posts">
	 	<li class="post">
	 		<div class="post_content" id="post-<?php the_ID(); ?>">
	 			<h2 class="title"><?php the_title(); ?></h2>
	 			<div class="txt">
	 			<?php the_content(); ?>

			<?php wp_link_pages('before=<p id="pages">页面&after=</p>'); ?>

			<?php $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
			if ($children) {?>
				<h3 id="subpages">二级页面</h3>
				<ul>
					<?php echo $children; ?>
				</ul>
			<?php } ?>
	 			</div>
	 			
	 		</div>
	 	</li>
	</ul>



	<?php comments_template();?>


<?php
	endwhile;
	else :
		echo walleve_404_message();
	endif;
?>
	<?php if(!(is_page() || is_single()) ){ ?>
		<div id="pagenav">
			<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
		</div>
	<?php } ?>

<?php get_footer(); ?>